package benchTest

import (
	"Ljohn/errTest/errorWrap"
	"bytes"
	"errors"
	"fmt"
)

func Errors(str ...string) (err error) {
	buf := bytes.Buffer{}
	for _, v := range str {
		buf.WriteString(v)
		buf.WriteString(",")
	}
	err = errors.New(buf.String())
	return
}

func FmtError(str ...string) (err error) {
	err = fmt.Errorf("%s", str)
	return
}

func CustomersError(str ...string) (err error) {
	buf := bytes.Buffer{}
	for _, v := range str {
		buf.WriteString(v)
		buf.WriteString(",")
	}
	err = errorWrap.NewErrT(buf.String(), 0)
	return
}
